package day06;

public class ArrayDemo {
    public static void main(String[] args) {
        //6.数组的复制
        int [] a = new int[6];//0,0,0,0,0,0
        int [] b = {10,20,30,40,50};
        System.arraycopy(a,1,b,2,3);//b:10,20,0,0,0
        System.arraycopy(b,0,a,2,3);//a:0,0,10,20,30,0
        for(int i = 0;i<b.length;i++){
            System.out.print(b[i]+",");
        }
        System.out.println();
        for(int i = 0;i<b.length;i++){
            System.out.print(a[i]+",");
        }



    }
}
